/* Overlay style */
.overlay {
	position: fixed;
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
	background: rgba(192,192,192,0.9);
	z-index: 9998;
} 

/* Overlay closing cross */
.overlay .overlay-close {
	width: 80px;
	height: 80px;
	position: absolute;
	right: 20px;
	top: 20px;
	overflow: hidden;/*定义元素溢出后的行为*/
	border: none;
	background:center;
	text-indent: 200%;/*首行文本的缩进*/
	color: transparent;
	outline: none;/*元素边缘的线*/
	z-index: 100;/*设置元素的堆叠顺序，值大的在值小的前面*/
}

/* Menu style */
.overlay nav {
	text-align: center;
	position: relative;
	top: 50%;/*定义了一个定位元素的上外边距边界与其包含块上边界之间的偏移*/
	height: 60%;
	font-size: 54px;
	-webkit-transform: translateY(-50%);
	transform: translateY(-50%);
}

.overlay ul {
	list-style: none;
	padding: 0;
	margin: 0 auto;
	display: inline-block;
	height: 100%;
	position: relative;
}

.overlay ul li {
	display: block;
	height: 20%;
	height: calc(100% / 5);
	min-height: 54px;
}

.overlay ul li a {
	font-weight: 300;
	display: block;
	color: #fff;
	-webkit-transition: color 0.2s;
	transition: color 0.2s;
}

.overlay ul li a:hover,
.overlay ul li a:focus {
	color: #e3fcb1;
	text-decoration: none;
}

/* Effects */
.overlay-hugeinc {
	opacity: 0;/*不透明级别*/
	visibility: hidden;
	-webkit-transition: opacity 0.5s, visibility 0s 0.5s;/*用于适配Safari和Chrome*/
	transition: opacity 0.5s, visibility 0s 0.5s;/*设置过渡动画*/
}

.overlay-hugeinc.open {
	opacity: 1;
	visibility: visible;
	-webkit-transition: opacity 0.5s;
	transition: opacity 0.5s;
}

.overlay-hugeinc nav {
	-webkit-perspective: 1200px;
	perspective: 1200px;
}

.overlay-hugeinc nav ul {
	opacity: 0.4;
	-webkit-transform: translateY(-25%) rotateX(35deg);
	transform: translateY(-25%) rotateX(35deg);
	-webkit-transition: -webkit-transform 0.5s, opacity 0.5s;
	transition: transform 0.5s, opacity 0.5s;
}

.overlay-hugeinc.open nav ul {
	opacity: 1;
	-webkit-transform: rotateX(0deg);
	transform: rotateX(0deg);
}

.overlay-hugeinc.close nav ul {
	-webkit-transform: translateY(25%) rotateX(-35deg);
	transform: translateY(25%) rotateX(-35deg);
}

@media screen and (max-height: 30.5em) {
	.overlay nav {
		height: 70%;
		font-size: 34px;
	}
	.overlay ul li {
		min-height: 34px;
	}
}

a {
	color: #99cc33;
	text-decoration: none;
	outline: none;
}